package org.example.aigc.mapper;

import org.apache.ibatis.annotations.Mapper;
import org.example.aigc.entity.Appearance;


import java.util.List;

@Mapper
public interface AppearanceMapper {
    /**
     * 向Appearance数据库插入一条数据
     *
     * @param appearance 待插入的外形
     * @return 新appearance的id
     */
    Long insert(Appearance appearance);

    /**
     * 用教师id查找已上传的外形
     *
     * @param teacherId 教师id
     * @return appearance列表
     */
    List<Appearance> selectByTeacherId(Long teacherId);

    /**
     * 用外形id查找已上传的外形
     *
     * @param id 外形id
     * @return 外形列表
     */
    Appearance selectById(Long id);

    /**
     * 删除appearanceId对应的外形
     *
     * @param appearanceId 待删除的外形id
     */
    void deleteById(Long appearanceId);
}
